package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.service.OrderNursingService;
import com.zzyl.serve.domain.NursingProject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/member/orders")
@Api(tags = "服务命令相关接口")
public class OrderNursingController extends BaseController {
    @Autowired
    private OrderNursingService orderNursingService;
    @GetMapping("/project/page")
    @ApiOperation("服务命令列表")
    public TableDataInfo pageList(NursingProject nursingProject){
        startPage();
        List<NursingProject> list = orderNursingService.pageList(nursingProject);
        return getDataTable(list);
    }
    @GetMapping("/project/{id}")
    @ApiOperation("服务命令详情")
    public NursingProject getById(Long id){
        return orderNursingService.getProjectById(id);
    }
}
